package com.yurun.service.impl;

import com.yurun.entity.Score;
import com.yurun.mapper.ScoreMapper;
import com.yurun.service.ScoreService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 宫静雨
 */
@Service
@Transactional(rollbackFor = SQLException.class)
public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements ScoreService {

    @Resource
    private ScoreMapper scoreMapper;

    @Override
    public List<Score> listScore(List<Integer> courseId, List<Integer> studentId,
                                 Integer lowScore, Integer highScore) {
        return scoreMapper.listScore(courseId, studentId, lowScore, highScore);
    }
}
